package org.come.Jpanel;

import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JPanel;


import com.tool.btn.GetLiangHaoBtn;
import com.tool.tcpimg.UIUtils;

@SuppressWarnings("serial")
public class GetLiangHaoJpanel extends JPanel {

    private GetLiangHaoTabJpanel getliangHaoTabJpanel;

    private GetLiangHaoBtn btnChoose, //选靓号
            btnRob,btnLetter;//抢靓号

    public GetLiangHaoJpanel() {
        this.setPreferredSize(new Dimension(697, 538));
        getliangHaoTabJpanel = new GetLiangHaoTabJpanel();
        this.setLayout(null);
        this.setBackground(UIUtils.Color_BACK);
        // 关闭按钮事件
//            FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/button/1.png", 1, 641);
//            offBtn.setBounds(697 - 35, 10, 25, 25);
//            this.add(offBtn);
        //选靓号
        btnChoose = new GetLiangHaoBtn("inkImg/newbutton/xuan.png", 1, 2, getliangHaoTabJpanel, this);
        btnChoose.setBounds(55 + 0 * 103 + 100, 0, 100, 35);
        this.add(btnChoose);
        //抢靓号
        btnRob = new GetLiangHaoBtn("inkImg/newbutton/qiangxiao.png", 1, 3, getliangHaoTabJpanel, this);
        btnRob.setBounds(55 + 1 * 103 + 100, 0, 100, 35);
        this.add(btnRob);
        //靓号信笺
        btnLetter = new GetLiangHaoBtn("inkImg/newbutton/xinjianxiao.png", 1, 4, getliangHaoTabJpanel, this);
        btnLetter.setBounds(55 + 2 * 103 + 100, 0, 100, 35);
        this.add(btnLetter);

        getliangHaoTabJpanel.setBounds(0, -20, 697, 538);
        this.add(getliangHaoTabJpanel);
    }
    private ImageIcon iconBack;

    @Override
    protected void paintComponent(Graphics g) {
        // TODO Auto-generated method stub
        super.paintComponent(g);
        if (iconBack == null) {
//                iconBack = new ImageIcon("inkImg/newbackground/GetLiangHao.png");
        }
//            g.drawImage(iconBack.getImage(), 0, 0, 697, 538, this);
        getliangHaoTabJpanel.setBounds(0+100, -20, 697, 538);
    }

    public GetLiangHaoTabJpanel getGetliangHaoTabJpanel() {
        return getliangHaoTabJpanel;
    }

    public void setGetliangHaoTabJpanel(GetLiangHaoTabJpanel getliangHaoTabJpanel) {
        this.getliangHaoTabJpanel = getliangHaoTabJpanel;
    }

    public GetLiangHaoBtn getBtnChoose() {
        return btnChoose;
    }

    public void setBtnChoose(GetLiangHaoBtn btnChoose) {
        this.btnChoose = btnChoose;
    }

    public GetLiangHaoBtn getBtnRob() {
        return btnRob;
    }

    public void setBtnRob(GetLiangHaoBtn btnRob) {
        this.btnRob = btnRob;
    }

    public GetLiangHaoBtn getBtnLetter() {
        return btnLetter;
    }

    public void setBtnLetter(GetLiangHaoBtn btnLetter) {
        this.btnLetter = btnLetter;
    }

    public ImageIcon getIconBack() {
        return iconBack;
    }

    public void setIconBack(ImageIcon iconBack) {
        this.iconBack = iconBack;
    }

}
